3.8.6 \(\int x (a+b x)^n \, dx\)

Optimal. Leaf size=39 \[ \frac {(a+b x)^{n+2}}{b^2 (n+2)}-\frac {a (a+b x)^{n+1}}{b^2 (n+1)} \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {43} \begin {gather*} \frac {(a+b x)^{n+2}}{b^2 (n+2)}-\frac {a (a+b x)^{n+1}}{b^2 (n+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x*(a + b*x)^n,x]

[Out]

-((a*(a + b*x)^(1 + n))/(b^2*(1 + n))) + (a + b*x)^(2 + n)/(b^2*(2 + n))

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin {align*} \int x (a+b x)^n \, dx &=\int \left (-\frac {a (a+b x)^n}{b}+\frac {(a+b x)^{1+n}}{b}\right ) \, dx\\ &=-\frac {a (a+b x)^{1+n}}{b^2 (1+n)}+\frac {(a+b x)^{2+n}}{b^2 (2+n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 33, normalized size = 0.85 \begin {gather*} \frac {(a+b x)^{n+1} (b (n+1) x-a)}{b^2 (n+1) (n+2)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x*(a + b*x)^n,x]

[Out]

((a + b*x)^(1 + n)*(-a + b*(1 + n)*x))/(b^2*(1 + n)*(2 + n))

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.02, size = 0, normalized size = 0.00 \begin {gather*} \int x (a+b x)^n \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[x*(a + b*x)^n,x]

[Out]

Defer[IntegrateAlgebraic][x*(a + b*x)^n, x]

________________________________________________________________________________________

fricas [A]  time = 1.14, size = 53, normalized size = 1.36 \begin {gather*} \frac {{\left (a b n x + {\left (b^{2} n + b^{2}\right )} x^{2} - a^{2}\right )} {\left (b x + a\right )}^{n}}{b^{2} n^{2} + 3 \, b^{2} n + 2 \, b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(b*x+a)^n,x, algorithm="fricas")

[Out]

(a*b*n*x + (b^2*n + b^2)*x^2 - a^2)*(b*x + a)^n/(b^2*n^2 + 3*b^2*n + 2*b^2)

________________________________________________________________________________________

giac [A]  time = 1.05, size = 76, normalized size = 1.95 \begin {gather*} \frac {{\left (b x + a\right )}^{n} b^{2} n x^{2} + {\left (b x + a\right )}^{n} a b n x + {\left (b x + a\right )}^{n} b^{2} x^{2} - {\left (b x + a\right )}^{n} a^{2}}{b^{2} n^{2} + 3 \, b^{2} n + 2 \, b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(b*x+a)^n,x, algorithm="giac")

[Out]

((b*x + a)^n*b^2*n*x^2 + (b*x + a)^n*a*b*n*x + (b*x + a)^n*b^2*x^2 - (b*x + a)^n*a^2)/(b^2*n^2 + 3*b^2*n + 2*b
^2)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 36, normalized size = 0.92 \begin {gather*} -\frac {\left (-x n b -b x +a \right ) \left (b x +a \right )^{n +1}}{\left (n^{2}+3 n +2\right ) b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(b*x+a)^n,x)

[Out]

-(b*x+a)^(n+1)*(-b*n*x-b*x+a)/b^2/(n^2+3*n+2)

________________________________________________________________________________________

maxima [A]  time = 1.31, size = 42, normalized size = 1.08 \begin {gather*} \frac {{\left (b^{2} {\left (n + 1\right )} x^{2} + a b n x - a^{2}\right )} {\left (b x + a\right )}^{n}}{{\left (n^{2} + 3 \, n + 2\right )} b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(b*x+a)^n,x, algorithm="maxima")

[Out]

(b^2*(n + 1)*x^2 + a*b*n*x - a^2)*(b*x + a)^n/((n^2 + 3*n + 2)*b^2)

________________________________________________________________________________________

mupad [B]  time = 0.38, size = 94, normalized size = 2.41 \begin {gather*} \left \{\begin {array}{cl} -\frac {a\,\ln \left (a+b\,x\right )-b\,x}{b^2} & \text {\ if\ \ }n=-1\\ \frac {\ln \left (a+b\,x\right )+\frac {a}{a+b\,x}}{b^2} & \text {\ if\ \ }n=-2\\ \frac {2\,\left (\frac {{\left (a+b\,x\right )}^{n+2}}{2\,n+4}-\frac {a\,{\left (a+b\,x\right )}^{n+1}}{2\,n+2}\right )}{b^2} & \text {\ if\ \ }n\neq -1\wedge n\neq -2 \end {array}\right . \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a + b*x)^n,x)

[Out]

piecewise(n == -1, -(a*log(a + b*x) - b*x)/b^2, n == -2, (log(a + b*x) + a/(a + b*x))/b^2, n ~= -1 & n ~= -2,
(2*((a + b*x)^(n + 2)/(2*n + 4) - (a*(a + b*x)^(n + 1))/(2*n + 2)))/b^2)

________________________________________________________________________________________

sympy [A]  time = 0.70, size = 201, normalized size = 5.15 \begin {gather*} \begin {cases} \frac {a^{n} x^{2}}{2} & \text {for}\: b = 0 \\\frac {a \log {\left (\frac {a}{b} + x \right )}}{a b^{2} + b^{3} x} + \frac {a}{a b^{2} + b^{3} x} + \frac {b x \log {\left (\frac {a}{b} + x \right )}}{a b^{2} + b^{3} x} & \text {for}\: n = -2 \\- \frac {a \log {\left (\frac {a}{b} + x \right )}}{b^{2}} + \frac {x}{b} & \text {for}\: n = -1 \\- \frac {a^{2} \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} + \frac {a b n x \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} + \frac {b^{2} n x^{2} \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} + \frac {b^{2} x^{2} \left (a + b x\right )^{n}}{b^{2} n^{2} + 3 b^{2} n + 2 b^{2}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(b*x+a)**n,x)

[Out]

Piecewise((a**n*x**2/2, Eq(b, 0)), (a*log(a/b + x)/(a*b**2 + b**3*x) + a/(a*b**2 + b**3*x) + b*x*log(a/b + x)/
(a*b**2 + b**3*x), Eq(n, -2)), (-a*log(a/b + x)/b**2 + x/b, Eq(n, -1)), (-a**2*(a + b*x)**n/(b**2*n**2 + 3*b**
2*n + 2*b**2) + a*b*n*x*(a + b*x)**n/(b**2*n**2 + 3*b**2*n + 2*b**2) + b**2*n*x**2*(a + b*x)**n/(b**2*n**2 + 3
*b**2*n + 2*b**2) + b**2*x**2*(a + b*x)**n/(b**2*n**2 + 3*b**2*n + 2*b**2), True))

________________________________________________________________________________________